import request from '@/utils/request';

// 查询评论列表
export function listComment(query) {
	return request({
		url: '/mall/comment/list',
		method: 'post',
		data: query,
	});
}

// 查询评论详细
export function getComment(id) {
	return request({
		url: '/mall/comment/getInfo',
		method: 'post',
		data: { id: id },
	});
}

// 新增评论
export function addComment(data) {
	return request({
		url: '/mall/comment/add',
		method: 'post',
		data: data,
	});
}

// 编辑评论
export function updateComment(data) {
	return request({
		url: '/mall/comment/edit',
		method: 'post',
		data: data,
	});
}

// 删除评论
export function delComment(id) {
	return request({
		url: '/mall/comment/remove',
		method: 'post',
		data: { id: id },
	});
}

// 导出评论
export function exportComment(query) {
	return request({
		url: '/mall/comment/export',
		method: 'post',
		params: query,
	});
}
